#pragma once

class FileGuard {
public:
    FileGuard(const char *filename, int flag);
    ~FileGuard();

    bool IsOK() const;
    int GetFd() const;

private:
    int fd = -1;
};
